/////////////////////////////////////////////////////////////////////////////
// Name:        maintoolbar.h
// Purpose:     
// Author:      Brant Young
// Modified by: 
// Created:     Mon May 14 21:46:51 2007
// RCS-ID:      
// Copyright:   Copyright (c) daodict.com 2007
// Licence:     GPL 2.0
/////////////////////////////////////////////////////////////////////////////
#pragma once

#include <wx/toolbar.h>
#include <wx/bmpcbox.h>

class ThemeManager;
class WordsWindow;

/**
 * WordsToolBar class declaration
 */
class WordsToolBar: public wxToolBar
{

public:
    /// Constructors
    WordsToolBar(WordsWindow* p_parent);
    
    /// Destructor
    virtual ~WordsToolBar();
    
    /// Events
    //void OnFind(wxCommandEvent& event);
    //void OnPrefers(wxCommandEvent& event);
    void OnSelectHistroy(wxCommandEvent& event);
    void OnClearHistory(wxCommandEvent& event);
    void OnForwardHistroy(wxCommandEvent& event);
    void OnBackwardHistroy(wxCommandEvent& event);
    
    wxBitmapComboBox* p_history_cmbox;
    
    void add_word_2_history(const wxString& word, int wordid);
    
    bool can_backward(int index) {
       	int count = p_history_cmbox->GetCount();
    	return (index>=(count-2))?false:true ;
    }
    
    bool can_forward(int index) {
    	return (0==index)?false:true;
    }

    /// Control identifiers
    enum {
    	ID_WORDS_TOOLBAR = 10101,
    	ID_FIND,
        ID_PRONOUN,
        ID_HISTORY_CMBOX,
        ID_CLEAR,
    };
    
protected:
    
    void InitEvents();
    
    ThemeManager* _p_thememgr;
    
    WordsWindow* _p_parent;

};

